<template>
	<view id="user-safe">
		<header-back :headerTitle="$lang('safe.title')"></header-back>
		<view class="content-safe">
			<view class="safe-ul">
				<view class="safe-li" @click="toRoute(1,$lang('safe.modifyLoginPassword'))">
					<view class="h3">{{ $lang('safe.modifyLoginPassword') }}</view>
					<image src="/static/icon/right_arrow_icon_01.png" class="arrow-r" mode=""></image>
				</view>
				<view class="safe-li" @click="toRoute(2,$lang('safe.changePaymentPassword'))">
					<view class="h3">{{ $lang('safe.changePaymentPassword') }}</view>
					<image src="/static/icon/right_arrow_icon_01.png" class="arrow-r" mode=""></image>
				</view>
				<view class="safe-li" v-if="userInfo.mobile" @click="toRoute(3,$lang('safe.rebindMobilePhoneNumber'))">
					<view class="h3">{{ $lang('safe.rebindMobilePhoneNumber') }}</view>
					<image src="/static/icon/right_arrow_icon_01.png" class="arrow-r" mode=""></image>
				</view>
				<view class="safe-li" v-if="userInfo.email" @click="toRoute(4,$lang('safe.rebindEmail'))">
					<view class="h3">{{ $lang('safe.rebindEmail') }}</view>
					<image src="/static/icon/right_arrow_icon_01.png" class="arrow-r" mode=""></image>
				</view>
				<view class="safe-li" v-if="false" @click="toRoute(5,'语言设置')">
					<view class="h3">语言设置</view>
					<view class="right">
						<view class="h6">中文</view>
						<image src="/static/icon/right_arrow_icon_01.png" class="arrow-r" mode=""></image>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import headerBack from '@/components/headerBack.vue'
export default {
	data() {
		return {
			userInfo: {},
		};
	},
	onLoad() {
		this.userInfo = uni.getStorageSync('userInfo')
	},
	components: {
		headerBack
	},
	onShow() {

	},
	methods: {
		// 跳转路由
		toRoute(type,name){
			uni.navigateTo({
				url: `/pages/member/password?type=${type}&title=${name}`
			})
		}
	}
};
</script>

<style>
	page {
		background: #F8F7FC;
	}
</style>

<style scoped lang="scss">
	.safe-ul {
		padding-top: 8rpx;
		.safe-li {
			width: 100%;
			height: 110rpx;
			padding: 0px 32rpx;
			box-sizing: border-box;
			background: #fff;
			display: flex;
			align-items: center;
			justify-content: space-between;
			border-bottom: 2rpx solid #E8EDF5;
			.h3 {
				font-size: 30rpx;
				font-weight: 500;
				color: #292929;
				line-height: 48rpx;
			}
			.right {
				display: flex;
				align-items: center;
				.h6 {
					font-size: 30rpx;
					font-weight: 400;
					color: #92969E;
					margin-right: 10rpx;
				}
			}
		}
	}
</style>
